package fei.yuzhi.com.loveflowers.fragment.firstpagefragment.detail.evaluate;

import fei.yuzhi.com.loveflowers.bean.evaluatebean.EvaluateBean;
import fei.yuzhi.com.loveflowers.utils.FirstPageHttpUtils;

/**
 * Created by My on 2016/10/18.
 */
public class EvaluateModel implements EvaluateContract.IEvaluateModel {
    @Override
    public void getEvaluateBean(final String data, final onSendEvaluateBeanListener sendEvaluateBeanListener) {
        new Thread(new Runnable() {
            @Override
            public void run() {
                FirstPageHttpUtils.getEvaluateBean(data, new FirstPageHttpUtils.onSendEvaluateBean() {
                    @Override
                    public void sendEvaluateBean(EvaluateBean evaluateBean) {
                        sendEvaluateBeanListener.sendEvaluateBean(evaluateBean);
                    }
                });
            }
        }).start();
    }

    public interface onSendEvaluateBeanListener{
        void sendEvaluateBean(EvaluateBean evaluateBean);
    }
}
